package com.wanshi.cloud.feign;


import com.wanshi.cloud.Result;
import com.wanshi.cloud.entity.Orders;
import com.wanshi.cloud.service.IOrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 顽石教育-www.wanshi.com
 * @since 2021-09-03
 */
@RestController
@RequestMapping("/feign/orders")
public class OrderFeign {
    @Autowired
     private IOrdersService iOrdersService;

    //根据用户id查询所有订单
    @GetMapping("/user/{userid}")
    public  List<Orders> findbyuserid(@PathVariable String userid){

        return    iOrdersService.findbyuserid(userid);



    }
}
